﻿using SqlSugar;
using System.ComponentModel.DataAnnotations;

namespace HY.Model
{
    [SugarTable("sys_user")]
    public class SysUser : BaseModel
    {

        /// <summary>
        /// 账户
        /// </summary>
        [Required]
        [SugarColumn(ColumnName = "user_name", ColumnDataType = "varchar(50)")]
        public string UserName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [Required]
        [SugarColumn(ColumnName = "password", ColumnDataType = "varchar(100)")]
        public string Password { get; set; }

        /// <summary>
        /// 角色id
        /// </summary>
        [SugarColumn(ColumnName = "role_id")]
        public int RoleId { get; set; }

        /// <summary>
        /// 角色名称
        /// </summary>
        [SugarColumn(ColumnName = "role_name", ColumnDataType = "nvarchar(20)")]
        public string RoleName { get; set; }

        /// <summary>
        /// 员工姓名
        /// </summary>
        [SugarColumn(ColumnName = "true_name", ColumnDataType = "nvarchar(10)")]
        public string TrueName { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        [SugarColumn(ColumnName = "id_number", ColumnDataType = "varchar(18)")]
        public string IDNumber { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        [SugarColumn(ColumnName = "phone_number", ColumnDataType = "varchar(20)")]
        public string PhoneNumber { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        [SugarColumn(ColumnName = "sort_number", DefaultValue = "0")]
        public int SortNumber { get; set; }
    }
}